package com.hbt.en_rem_hou.dao;

import com.hbt.en_rem_hou.entitys.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserDao {
    @Insert("insert into users (username, password) values (#{username}, #{password})")
    public int insertUser(User user);

    @Select("select *from users where username = #{username} and password = #{password}")
    public User getUserByUsernameAndPassword(User user);

    @Select("select *from users where id = #{id}")
    public User getUserByID(int id);
}
